package models

import (
	"gorm.io/gorm"
)

type DailyReserveStock struct {
	gorm.Model
	HospitalId     int `gorm:"type:int;comment:'医院id'"`
	PackageId      int `gorm:"type:int;comment:'套餐id'"`
	TotalStock     int `gorm:"type:int;comment:'总库存'"`
	UsedStock      int `gorm:"type:int;comment:'已被预约的数量'"`
	RemainingStock int `gorm:"type:int;comment:'剩余可预约数量'"`
	Status         int `gorm:"type:int;comment:'库存状态 0 可预约 1 已满 2关闭预约'"`
}

func (o *DailyReserveStock) Create(db *gorm.DB) error {
	err := db.Create(&DailyReserveStock{}).Error
	return err

}
